﻿using System.ServiceModel;
using Be;
using System;
using System.Collections.Generic;

namespace Bll {
 
    /// <summary>
    /// The ILessonService interface
    /// </summary>
    [ServiceContract]
    public interface ILessonService {

        /// <summary>
        /// Get all the lessons
        /// </summary>
        /// <returns>The lessons</returns>
        [OperationContract]
        List<BeLesson> GetLessons();

        /// <summary>
        /// Get all lessons in a specific week
        /// </summary>
        /// <param name="starttime">The start day</param>
        /// <param name="days">The days from the start day</param>
        /// <returns>The Lessons</returns>
        [OperationContract]
        List<BeLesson> GetEvents(DateTime starttime, int days);

        /// <summary>
        /// Get a lesson from an id
        /// </summary>
        /// <param name="id">The id to get the lesson from</param>
        /// <returns>The lesson</returns>
        [OperationContract]
        BeLesson GetLesson(int id);

        /// <summary>
        /// Save a lesson
        /// </summary>
        /// <param name="lesson">The lesson to save</param>
        /// <returns>A message</returns>
        [OperationContract]
        string SaveLesson(BeLesson lesson);

        /// <summary>
        /// Edit a lesson
        /// </summary>
        /// <param name="lesson">The lesson to edit</param>
        /// <returns>A message</returns>
        [OperationContract]
        string EditLesson(BeLesson lesson);

        /// <summary>
        /// Edit a comment
        /// </summary>
        /// <param name="comment">The comment to edit</param>
        /// <returns>A message</returns>
        [OperationContract]
        string Editcomment(BeLesson comment);

        /// <summary>
        /// Delete a lesson
        /// </summary>
        /// <param name="lesson">The lesson to delete</param>
        /// <returns>A message</returns>
        [OperationContract]
        string DeleteLesson(BeLesson lesson);

        /// <summary>
        /// Check if there is a lesson to the booking
        /// </summary>
        /// <param name="booking">The booking to check existing lesson from</param>
        /// <returns>The lesson if it is found. Null otherwise</returns>
        [OperationContract]
        BeLesson LessonPresents(BeBooking booking);
    }
}